﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace HdipCricketClub.Models
{
    public class ClubRepository
    {
        CricketClubEntities db = new CricketClubEntities();

        public Club GetClub(int id)
        {
            return db.Clubs.Single(c => c.club_id == id);
        }

        public IQueryable<Club> FindAllClubs()
        {
            return db.Clubs.Include("Member").Include("Member1").Include("Member2").Include("Member3").Include("County1");
        }
    }
}